<?php

namespace app\store\model;
use app\common\model\Winad as WinadModel;

/**
 * 广告模型
 * Class Coupon
 * @package app\store\model
 */
class Winad extends WinadModel
{
    public function index($data)
    {
      return $this->allowField(true)->save($data) !== false;
    }
	
	/**
     * 添加新记录
     * @param $data
     * @return false|int
     */
    public function add($data)
    {
        $data['wxapp_id'] = self::$wxapp_id;
		$data['ad_id'] = self::$wxapp_id;
        return $this->allowField(true)->save($data);
    }


}
